package com.example.com.daervideo.fragments.video;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

import me.goldze.mvvmhabit.crash.CaocConfig;

/**
 * Created by i7-1 on 2018/12/7.
 */

public class ContentPagerAdapter extends FragmentPagerAdapter {

    private List<Fragment> tabFragments;
    private String[] tabIndicators;

    public ContentPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    public void setLists(List<Fragment> tabFragments,String[] tabIndicators) {
        this.tabFragments = tabFragments;
        this.tabIndicators = tabIndicators;
    }


    @Override
    public Fragment getItem(int position) {
        return tabFragments.get(position);
    }

    @Override
    public int getCount() {
        return tabIndicators.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tabIndicators[position];
    }
}